Optimal. Leaf size=128 \[ -\frac{\tan ^{-1}\left (\frac{\sqrt{a-b} \tan (e+f x)}{\sqrt{a+b \tan ^2(e+f x)}}\right )}{f (a-b)^{5/2}}+\frac{(2 a+b) \tan (e+f x)}{3 a f (a-b)^2 \sqrt{a+b \tan ^2(e+f x)}}+\frac{\tan (e+f x)}{3 f (a-b) \left (a+b \tan ^2(e+f x)\right )^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.152694, antiderivative size = 128, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.24, Rules used = {3670, 471, 527, 12, 377, 203} \[ -\frac{\tan ^{-1}\left (\frac{\sqrt{a-b} \tan (e+f x)}{\sqrt{a+b \tan ^2(e+f x)}}\right )}{f (a-b)^{5/2}}+\frac{(2 a+b) \tan (e+f x)}{3 a f (a-b)^2 \sqrt{a+b \tan ^2(e+f x)}}+\frac{\tan (e+f x)}{3 f (a-b) \left (a+b \tan ^2(e+f x)\right )^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3670
Rule 471
Rule 527
Rule 12
Rule 377
Rule 203
Rubi steps
\begin{align*} \int \frac{\tan ^2(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{5/2}} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{x^2}{\left (1+x^2\right ) \left (a+b x^2\right )^{5/2}} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\tan (e+f x)}{3 (a-b) f \left (a+b \tan ^2(e+f x)\right )^{3/2}}-\frac{\operatorname{Subst}\left (\int \frac{1-2 x^2}{\left (1+x^2\right ) \left (a+b x^2\right )^{3/2}} \, dx,x,\tan (e+f x)\right )}{3 (a-b) f}\\ &=\frac{\tan (e+f x)}{3 (a-b) f \left (a+b \tan ^2(e+f x)\right )^{3/2}}+\frac{(2 a+b) \tan (e+f x)}{3 a (a-b)^2 f \sqrt{a+b \tan ^2(e+f x)}}-\frac{\operatorname{Subst}\left (\int \frac{3 a}{\left (1+x^2\right ) \sqrt{a+b x^2}} \, dx,x,\tan (e+f x)\right )}{3 a (a-b)^2 f}\\ &=\frac{\tan (e+f x)}{3 (a-b) f \left (a+b \tan ^2(e+f x)\right )^{3/2}}+\frac{(2 a+b) \tan (e+f x)}{3 a (a-b)^2 f \sqrt{a+b \tan ^2(e+f x)}}-\frac{\operatorname{Subst}\left (\int \frac{1}{\left (1+x^2\right ) \sqrt{a+b x^2}} \, dx,x,\tan (e+f x)\right )}{(a-b)^2 f}\\ &=\frac{\tan (e+f x)}{3 (a-b) f \left (a+b \tan ^2(e+f x)\right )^{3/2}}+\frac{(2 a+b) \tan (e+f x)}{3 a (a-b)^2 f \sqrt{a+b \tan ^2(e+f x)}}-\frac{\operatorname{Subst}\left (\int \frac{1}{1-(-a+b) x^2} \, dx,x,\frac{\tan (e+f x)}{\sqrt{a+b \tan ^2(e+f x)}}\right )}{(a-b)^2 f}\\ &=-\frac{\tan ^{-1}\left (\frac{\sqrt{a-b} \tan (e+f x)}{\sqrt{a+b \tan ^2(e+f x)}}\right )}{(a-b)^{5/2} f}+\frac{\tan (e+f x)}{3 (a-b) f \left (a+b \tan ^2(e+f x)\right )^{3/2}}+\frac{(2 a+b) \tan (e+f x)}{3 a (a-b)^2 f \sqrt{a+b \tan ^2(e+f x)}}\\ \end{align*}
Mathematica [C] time = 7.73209, size = 365, normalized size = 2.85 \[ \frac{\cos ^4(e+f x) \cot (e+f x) \left (12 (a-b)^3 \tan ^6(e+f x) \left (a+b \tan ^2(e+f x)\right ) \text{Hypergeometric2F1}\left (2,2,\frac{9}{2},\frac{(a-b) \sin ^2(e+f x)}{a}\right ) \sqrt{\frac{\sin ^2(e+f x) \cos ^2(e+f x) \left (a^2+a b \left (\tan ^2(e+f x)-1\right )-b^2 \tan ^2(e+f x)\right )}{a^2}}+35 a \sec ^2(e+f x) \left (5 a+2 b \tan ^2(e+f x)\right ) \left (a \sec ^2(e+f x) \left (a \left (\tan ^2(e+f x)-3\right )-4 b \tan ^2(e+f x)\right ) \sqrt{\frac{\sin ^2(e+f x) \cos ^2(e+f x) \left (a^2+a b \left (\tan ^2(e+f x)-1\right )-b^2 \tan ^2(e+f x)\right )}{a^2}}+3 \sin ^{-1}\left (\sqrt{\frac{(a-b) \sin ^2(e+f x)}{a}}\right ) \left (a+b \tan ^2(e+f x)\right )^2\right )\right )}{315 a^4 f (a-b)^2 \sqrt{a+b \tan ^2(e+f x)} \left (\frac{b \tan ^2(e+f x)}{a}+1\right ) \sqrt{\frac{(a-b) \sin ^2(e+f x) \cos ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )}{a^2}}} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.044, size = 232, normalized size = 1.8 \begin{align*}{\frac{\tan \left ( fx+e \right ) }{3\,fa} \left ( a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{-{\frac{3}{2}}}}+{\frac{2\,\tan \left ( fx+e \right ) }{3\,f{a}^{2}}{\frac{1}{\sqrt{a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2}}}}}+{\frac{b\tan \left ( fx+e \right ) }{f \left ( a-b \right ) ^{2}a}{\frac{1}{\sqrt{a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2}}}}}-{\frac{1}{f \left ( a-b \right ) ^{3}{b}^{2}}\sqrt{{b}^{4} \left ( a-b \right ) }\arctan \left ({ \left ( a-b \right ){b}^{2}\tan \left ( fx+e \right ){\frac{1}{\sqrt{{b}^{4} \left ( a-b \right ) }}}{\frac{1}{\sqrt{a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2}}}}} \right ) }+{\frac{b\tan \left ( fx+e \right ) }{3\,a \left ( a-b \right ) f} \left ( a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{-{\frac{3}{2}}}}+{\frac{2\,b\tan \left ( fx+e \right ) }{3\,f \left ( a-b \right ){a}^{2}}{\frac{1}{\sqrt{a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.14815, size = 1176, normalized size = 9.19 \begin{align*} \left [-\frac{3 \,{\left (a b^{2} \tan \left (f x + e\right )^{4} + 2 \, a^{2} b \tan \left (f x + e\right )^{2} + a^{3}\right )} \sqrt{-a + b} \log \left (-\frac{{\left (a - 2 \, b\right )} \tan \left (f x + e\right )^{2} + 2 \, \sqrt{b \tan \left (f x + e\right )^{2} + a} \sqrt{-a + b} \tan \left (f x + e\right ) - a}{\tan \left (f x + e\right )^{2} + 1}\right ) - 2 \,{\left ({\left (2 \, a^{2} b - a b^{2} - b^{3}\right )} \tan \left (f x + e\right )^{3} + 3 \,{\left (a^{3} - a^{2} b\right )} \tan \left (f x + e\right )\right )} \sqrt{b \tan \left (f x + e\right )^{2} + a}}{6 \,{\left ({\left (a^{4} b^{2} - 3 \, a^{3} b^{3} + 3 \, a^{2} b^{4} - a b^{5}\right )} f \tan \left (f x + e\right )^{4} + 2 \,{\left (a^{5} b - 3 \, a^{4} b^{2} + 3 \, a^{3} b^{3} - a^{2} b^{4}\right )} f \tan \left (f x + e\right )^{2} +{\left (a^{6} - 3 \, a^{5} b + 3 \, a^{4} b^{2} - a^{3} b^{3}\right )} f\right )}}, -\frac{3 \,{\left (a b^{2} \tan \left (f x + e\right )^{4} + 2 \, a^{2} b \tan \left (f x + e\right )^{2} + a^{3}\right )} \sqrt{a - b} \arctan \left (-\frac{\sqrt{b \tan \left (f x + e\right )^{2} + a}}{\sqrt{a - b} \tan \left (f x + e\right )}\right ) -{\left ({\left (2 \, a^{2} b - a b^{2} - b^{3}\right )} \tan \left (f x + e\right )^{3} + 3 \,{\left (a^{3} - a^{2} b\right )} \tan \left (f x + e\right )\right )} \sqrt{b \tan \left (f x + e\right )^{2} + a}}{3 \,{\left ({\left (a^{4} b^{2} - 3 \, a^{3} b^{3} + 3 \, a^{2} b^{4} - a b^{5}\right )} f \tan \left (f x + e\right )^{4} + 2 \,{\left (a^{5} b - 3 \, a^{4} b^{2} + 3 \, a^{3} b^{3} - a^{2} b^{4}\right )} f \tan \left (f x + e\right )^{2} +{\left (a^{6} - 3 \, a^{5} b + 3 \, a^{4} b^{2} - a^{3} b^{3}\right )} f\right )}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\tan ^{2}{\left (e + f x \right )}}{\left (a + b \tan ^{2}{\left (e + f x \right )}\right )^{\frac{5}{2}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\tan \left (f x + e\right )^{2}}{{\left (b \tan \left (f x + e\right )^{2} + a\right )}^{\frac{5}{2}}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]